package com.jxw.launcher.view;

import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.widget.RadioButton;
import com.jxw.launcher.R;

/* loaded from: classes.dex */
public class MyRadioButton extends RadioButton {
    private float mImg_height;
    private float mImg_width;

    public MyRadioButton(Context context) {
        super(context);
    }

    public MyRadioButton(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
        TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, R.styleable.MyRadioButton);
        this.mImg_width = obtainStyledAttributes.getDimension(1, 25.0f);
        this.mImg_height = obtainStyledAttributes.getDimension(0, 25.0f);
        obtainStyledAttributes.recycle();
    }

    @Override // android.widget.TextView, android.view.View
    protected void onMeasure(int i, int i2) {
        super.onMeasure(i, i2);
        Drawable drawable = getCompoundDrawables()[0];
        Drawable drawable2 = getCompoundDrawables()[1];
        Drawable drawable3 = getCompoundDrawables()[2];
        Drawable drawable4 = getCompoundDrawables()[3];
        if (drawable != null) {
            drawable.setBounds(0, 0, (int) this.mImg_width, (int) this.mImg_height);
            setCompoundDrawables(drawable, null, null, null);
        }
        if (drawable3 != null) {
            drawable3.setBounds(0, 0, (int) this.mImg_width, (int) this.mImg_height);
            setCompoundDrawables(null, null, drawable3, null);
        }
        if (drawable2 != null) {
            drawable2.setBounds(0, 0, (int) this.mImg_width, (int) this.mImg_height);
            setCompoundDrawables(null, drawable2, null, null);
        }
        if (drawable4 != null) {
            drawable4.setBounds(0, 0, (int) this.mImg_width, (int) this.mImg_height);
            setCompoundDrawables(null, null, null, drawable4);
        }
    }
}
